(0) Obligation:

Runtime Complexity TRS:
The TRS R consists of the following rules:

minus(x, 0) → x
minus(s(x), s(y)) → minus(x, y)
quot(0, s(y)) → 0
quot(s(x), s(y)) → s(quot(minus(x, y), s(y)))
plus(0, y) → y
plus(s(x), y) → s(plus(x, y))
plus(minus(x, s(0)), minus(y, s(s(z)))) → plus(minus(y, s(s(z))), minus(x, s(0)))

Rewrite Strategy: INNERMOST

(1) CpxTrsToCdtProof (BOTH BOUNDS(ID, ID) transformation)

Converted CpxTRS to CDT

(2) Obligation:

Complexity Dependency Tuples Problem
Rules:

minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
quot(0, s(z0)) → 0
quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
plus(minus(z0, s(0)), minus(z1, s(s(z2)))) → plus(minus(z1, s(s(z2))), minus(z0, s(0)))
Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c6(PLUS(minus(z1, s(s(z2))), minus(z0, s(0))), MINUS(z1, s(s(z2))), MINUS(z0, s(0)))
S tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c6(PLUS(minus(z1, s(s(z2))), minus(z0, s(0))), MINUS(z1, s(s(z2))), MINUS(z0, s(0)))
K tuples:none
Defined Rule Symbols:

minus, quot, plus

Defined Pair Symbols:

MINUS, QUOT, PLUS

Compound Symbols:

c1, c3, c5, c6

(3) CdtGraphSplitRhsProof (BOTH BOUNDS(ID, ID) transformation)

Split RHS of tuples not part of any SCC

(4) Obligation:

Complexity Dependency Tuples Problem
Rules:

minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
quot(0, s(z0)) → 0
quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
plus(minus(z0, s(0)), minus(z1, s(s(z2)))) → plus(minus(z1, s(s(z2))), minus(z0, s(0)))
Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(PLUS(minus(z1, s(s(z2))), minus(z0, s(0))))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z1, s(s(z2))))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z0, s(0)))
S tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(PLUS(minus(z1, s(s(z2))), minus(z0, s(0))))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z1, s(s(z2))))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z0, s(0)))
K tuples:none
Defined Rule Symbols:

minus, quot, plus

Defined Pair Symbols:

MINUS, QUOT, PLUS

Compound Symbols:

c1, c3, c5, c

(5) CdtGraphRemoveTrailingProof (BOTH BOUNDS(ID, ID) transformation)

Removed 1 trailing tuple parts

(6) Obligation:

Complexity Dependency Tuples Problem
Rules:

minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
quot(0, s(z0)) → 0
quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
plus(minus(z0, s(0)), minus(z1, s(s(z2)))) → plus(minus(z1, s(s(z2))), minus(z0, s(0)))
Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z1, s(s(z2))))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z0, s(0)))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c
S tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z1, s(s(z2))))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z0, s(0)))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c
K tuples:none
Defined Rule Symbols:

minus, quot, plus

Defined Pair Symbols:

MINUS, QUOT, PLUS

Compound Symbols:

c1, c3, c5, c, c

(7) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z1, s(s(z2))))
We considered the (Usable) Rules:

minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
And the Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z1, s(s(z2))))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z0, s(0)))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [2]   
POL(MINUS(x1, x2)) = 0   
POL(PLUS(x1, x2)) = [5]x2   
POL(QUOT(x1, x2)) = 0   
POL(c) = 0   
POL(c(x1)) = x1   
POL(c1(x1)) = x1   
POL(c3(x1, x2)) = x1 + x2   
POL(c5(x1)) = x1   
POL(minus(x1, x2)) = [4] + [4]x1   
POL(s(x1)) = 0   

(8) Obligation:

Complexity Dependency Tuples Problem
Rules:

minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
quot(0, s(z0)) → 0
quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
plus(minus(z0, s(0)), minus(z1, s(s(z2)))) → plus(minus(z1, s(s(z2))), minus(z0, s(0)))
Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z1, s(s(z2))))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z0, s(0)))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c
S tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z0, s(0)))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c
K tuples:

PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z1, s(s(z2))))
Defined Rule Symbols:

minus, quot, plus

Defined Pair Symbols:

MINUS, QUOT, PLUS

Compound Symbols:

c1, c3, c5, c, c

(9) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

PLUS(s(z0), z1) → c5(PLUS(z0, z1))
We considered the (Usable) Rules:

minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
And the Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z1, s(s(z2))))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z0, s(0)))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(MINUS(x1, x2)) = 0   
POL(PLUS(x1, x2)) = [1] + [2]x1   
POL(QUOT(x1, x2)) = 0   
POL(c) = 0   
POL(c(x1)) = x1   
POL(c1(x1)) = x1   
POL(c3(x1, x2)) = x1 + x2   
POL(c5(x1)) = x1   
POL(minus(x1, x2)) = 0   
POL(s(x1)) = [2] + x1   

(10) Obligation:

Complexity Dependency Tuples Problem
Rules:

minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
quot(0, s(z0)) → 0
quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
plus(minus(z0, s(0)), minus(z1, s(s(z2)))) → plus(minus(z1, s(s(z2))), minus(z0, s(0)))
Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z1, s(s(z2))))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z0, s(0)))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c
S tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z0, s(0)))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c
K tuples:

PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z1, s(s(z2))))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
Defined Rule Symbols:

minus, quot, plus

Defined Pair Symbols:

MINUS, QUOT, PLUS

Compound Symbols:

c1, c3, c5, c, c

(11) CdtKnowledgeProof (EQUIVALENT transformation)

The following tuples could be moved from S to K by knowledge propagation:

PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z0, s(0)))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c

(12) Obligation:

Complexity Dependency Tuples Problem
Rules:

minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
quot(0, s(z0)) → 0
quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
plus(minus(z0, s(0)), minus(z1, s(s(z2)))) → plus(minus(z1, s(s(z2))), minus(z0, s(0)))
Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z1, s(s(z2))))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z0, s(0)))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c
S tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
K tuples:

PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z1, s(s(z2))))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z0, s(0)))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c
Defined Rule Symbols:

minus, quot, plus

Defined Pair Symbols:

MINUS, QUOT, PLUS

Compound Symbols:

c1, c3, c5, c, c

(13) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^1))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
We considered the (Usable) Rules:

minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
And the Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z1, s(s(z2))))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z0, s(0)))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = [2]   
POL(MINUS(x1, x2)) = 0   
POL(PLUS(x1, x2)) = [1] + [3]x2   
POL(QUOT(x1, x2)) = x1   
POL(c) = 0   
POL(c(x1)) = x1   
POL(c1(x1)) = x1   
POL(c3(x1, x2)) = x1 + x2   
POL(c5(x1)) = x1   
POL(minus(x1, x2)) = x1   
POL(s(x1)) = [1] + x1   

(14) Obligation:

Complexity Dependency Tuples Problem
Rules:

minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
quot(0, s(z0)) → 0
quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
plus(minus(z0, s(0)), minus(z1, s(s(z2)))) → plus(minus(z1, s(s(z2))), minus(z0, s(0)))
Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z1, s(s(z2))))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z0, s(0)))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c
S tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
K tuples:

PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z1, s(s(z2))))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z0, s(0)))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
Defined Rule Symbols:

minus, quot, plus

Defined Pair Symbols:

MINUS, QUOT, PLUS

Compound Symbols:

c1, c3, c5, c, c

(15) CdtPolyRedPairProof (UPPER BOUND (ADD(O(n^2))) transformation)

Found a reduction pair which oriented the following tuples strictly. Hence they can be removed from S.

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
We considered the (Usable) Rules:

minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
And the Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z1, s(s(z2))))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z0, s(0)))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c
The order we found is given by the following interpretation:
Polynomial interpretation :

POL(0) = 0   
POL(MINUS(x1, x2)) = [2] + x1   
POL(PLUS(x1, x2)) = x1 + [2]x22   
POL(QUOT(x1, x2)) = x12   
POL(c) = 0   
POL(c(x1)) = x1   
POL(c1(x1)) = x1   
POL(c3(x1, x2)) = x1 + x2   
POL(c5(x1)) = x1   
POL(minus(x1, x2)) = [1] + x1   
POL(s(x1)) = [2] + x1   

(16) Obligation:

Complexity Dependency Tuples Problem
Rules:

minus(z0, 0) → z0
minus(s(z0), s(z1)) → minus(z0, z1)
quot(0, s(z0)) → 0
quot(s(z0), s(z1)) → s(quot(minus(z0, z1), s(z1)))
plus(0, z0) → z0
plus(s(z0), z1) → s(plus(z0, z1))
plus(minus(z0, s(0)), minus(z1, s(s(z2)))) → plus(minus(z1, s(s(z2))), minus(z0, s(0)))
Tuples:

MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z1, s(s(z2))))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z0, s(0)))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c
S tuples:none
K tuples:

PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z1, s(s(z2))))
PLUS(s(z0), z1) → c5(PLUS(z0, z1))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c(MINUS(z0, s(0)))
PLUS(minus(z0, s(0)), minus(z1, s(s(z2)))) → c
QUOT(s(z0), s(z1)) → c3(QUOT(minus(z0, z1), s(z1)), MINUS(z0, z1))
MINUS(s(z0), s(z1)) → c1(MINUS(z0, z1))
Defined Rule Symbols:

minus, quot, plus

Defined Pair Symbols:

MINUS, QUOT, PLUS

Compound Symbols:

c1, c3, c5, c, c

(17) SIsEmptyProof (EQUIVALENT transformation)

The set S is empty

(18) BOUNDS(O(1), O(1))